inherited crdTenant: TcrdTenant
  Left = 447
  Top = 297
  Height = 424
  HelpContext = 11421
  BorderIcons = [biSystemMenu, biMinimize, biMaximize, biHelp]
  Caption = #1050#1072#1088#1090#1086#1095#1082#1072' '#1075#1088#1072#1078#1076#1072#1085#1080#1085#1072
  Constraints.MinHeight = 424
  Constraints.MinWidth = 700
  OldCreateOrder = True
  ShowHint = True
  OnShow = FormShow
  PixelsPerInch = 96
  TextHeight = 13
  inherited Panel1: TPanel
    Top = 370
  end
  inherited ToolBar1: TToolBar
    EdgeBorders = [ebTop, ebBottom]
    inherited ToolButton2: TToolButton
      Visible = False
    end
  end
  object pgcTenantAddProps: TPageControl [2]
    Left = 0
    Top = 29
    Width = 792
    Height = 341
    ActivePage = tsTenant
    Align = alClient
    Font.Charset = DEFAULT_CHARSET
    Font.Color = clWindowText
    Font.Height = -11
    Font.Name = 'MS Sans Serif'
    Font.Style = [fsBold]
    ParentFont = False
    Style = tsFlatButtons
    TabOrder = 2
    object tsTenant: TTabSheet
      Caption = #1043#1088#1072#1078#1076#1072#1085#1080#1085
      ImageIndex = 2
      object Panel2: TPanel
        Left = 0
        Top = 0
        Width = 784
        Height = 310
        Align = alClient
        BevelOuter = bvNone
        Caption = 'Panel2'
        TabOrder = 0
        object Panel3: TPanel
          Left = 388
          Top = 0
          Width = 396
          Height = 310
          Align = alRight
          BevelOuter = bvNone
          TabOrder = 0
          object GroupBox2: TGroupBox
            Left = 0
            Top = 0
            Width = 396
            Height = 310
            Align = alClient
            Caption = ' '#1055#1088#1086#1087#1080#1089#1082#1072' '
            Constraints.MinHeight = 65
            Font.Charset = DEFAULT_CHARSET
            Font.Color = clWindowText
            Font.Height = -11
            Font.Name = 'MS Sans Serif'
            Font.Style = [fsBold]
            ParentFont = False
            TabOrder = 0
            object pcPropis: TPageControl
              Left = 2
              Top = 15
              Width = 392
              Height = 293
              ActivePage = tsPropisHist
              Align = alClient
              Font.Charset = DEFAULT_CHARSET
              Font.Color = clWindowText
              Font.Height = -11
              Font.Name = 'MS Sans Serif'
              Font.Style = []
              ParentFont = False
              Style = tsFlatButtons
              TabOrder = 0
              object tsPropisCur: TTabSheet
                Hint = #1058#1077#1082#1091#1097#1072#1103' '#1087#1088#1086#1087#1080#1089#1082#1072
                Caption = #1058#1077#1082#1091#1097#1072#1103
                object dbg_CurrentStatus: TDBGridEh
                  Left = 0
                  Top = 0
                  Width = 384
                  Height = 238
                  Align = alClient
                  DataGrouping.GroupLevels = <>
                  DataSource = dscClientStatus
                  Flat = True
                  Font.Charset = DEFAULT_CHARSET
                  Font.Color = clWindowText
                  Font.Height = -11
                  Font.Name = 'MS Sans Serif'
                  Font.Style = []
                  FooterColor = clWindow
                  FooterFont.Charset = DEFAULT_CHARSET
                  FooterFont.Color = clWindowText
                  FooterFont.Height = -11
                  FooterFont.Name = 'MS Sans Serif'
                  FooterFont.Style = [fsBold]
                  Options = [dgTitles, dgColumnResize, dgColLines, dgRowLines, dgTabs, dgRowSelect, dgConfirmDelete, dgCancelOnExit]
                  OptionsEh = [dghFixed3D, dghHighlightFocus, dghClearSelection, dghDblClickOptimizeColWidth, dghDialogFind, dghColumnResize, dghColumnMove]
                  ParentFont = False
                  ReadOnly = True
                  RowDetailPanel.Color = clBtnFace
                  TabOrder = 0
                  TitleFont.Charset = DEFAULT_CHARSET
                  TitleFont.Color = clWindowText
                  TitleFont.Height = -11
                  TitleFont.Name = 'MS Sans Serif'
                  TitleFont.Style = []
                  UseMultiTitle = True
                  VTitleMargin = 5
                  Columns = <
                    item
                      EditButtons = <>
                      FieldName = 'ADDRESS'
                      Footers = <>
                      Width = 180
                    end
                    item
                      EditButtons = <>
                      FieldName = 'STATUS'
                      Footers = <>
                    end
                    item
                      EditButtons = <>
                      FieldName = 'RDOCDATE'
                      Footers = <>
                    end
                    item
                      EditButtons = <>
                      FieldName = 'REDATE'
                      Footers = <>
                    end>
                  object RowDetailData: TRowDetailPanelControlEh
                  end
                end
              end
              object tsPropisHist: TTabSheet
                Caption = #1054#1087#1077#1088#1072#1094#1080#1080' '#1089' '#1087#1088#1086#1087#1080#1089#1082#1086#1081
                ImageIndex = 1
                OnShow = tsPropisHistShow
                object dbgPropisHist: TDBGridEh
                  Left = 0
                  Top = 23
                  Width = 384
                  Height = 239
                  Hint = #1048#1089#1090#1086#1088#1080#1103' '#1087#1088#1086#1087#1080#1089#1082#1080' '#1075#1088#1072#1078#1076#1072#1085#1080#1085#1072
                  Align = alClient
                  DataGrouping.GroupLevels = <>
                  DataSource = dscTenantStatusHist
                  Flat = True
                  FooterColor = clWindow
                  FooterFont.Charset = DEFAULT_CHARSET
                  FooterFont.Color = clWindowText
                  FooterFont.Height = -11
                  FooterFont.Name = 'MS Sans Serif'
                  FooterFont.Style = []
                  Options = [dgTitles, dgColumnResize, dgColLines, dgRowLines, dgTabs, dgRowSelect, dgConfirmDelete, dgCancelOnExit]
                  RowDetailPanel.Color = clBtnFace
                  TabOrder = 0
                  TitleFont.Charset = DEFAULT_CHARSET
                  TitleFont.Color = clWindowText
                  TitleFont.Height = -11
                  TitleFont.Name = 'MS Sans Serif'
                  TitleFont.Style = []
                  UseMultiTitle = True
                  VTitleMargin = 5
                  Columns = <
                    item
                      EditButtons = <>
                      FieldName = 'STATUS'
                      Footers = <>
                      Width = 60
                    end
                    item
                      EditButtons = <>
                      FieldName = 'RDOCDATE'
                      Footers = <>
                      Width = 61
                    end
                    item
                      EditButtons = <>
                      FieldName = 'ADRESS'
                      Footers = <>
                      Width = 139
                    end
                    item
                      EditButtons = <>
                      FieldName = 'CREATEUSER'
                      Footers = <>
                      Width = 56
                    end
                    item
                      EditButtons = <>
                      FieldName = 'RCREATEDATE'
                      Footers = <>
                      Width = 59
                    end
                    item
                      EditButtons = <>
                      FieldName = 'RNOTE'
                      Footers = <>
                    end>
                  object RowDetailData: TRowDetailPanelControlEh
                  end
                end
                object ToolBar3: TToolBar
                  Left = 0
                  Top = 0
                  Width = 384
                  Height = 23
                  Caption = 'ToolBar2'
                  EdgeBorders = []
                  Flat = True
                  Images = MAIN.ImageList
                  TabOrder = 1
                  object ToolButton9: TToolButton
                    Left = 0
                    Top = 0
                    Action = aTenHistrNew
                  end
                  object ToolButton11: TToolButton
                    Left = 23
                    Top = 0
                    Width = 8
                    Caption = 'ToolButton7'
                    ImageIndex = 2
                    Style = tbsSeparator
                  end
                  object ToolButton12: TToolButton
                    Left = 31
                    Top = 0
                    Action = aTenHistrDel
                  end
                end
              end
            end
          end
        end
        object Panel4: TPanel
          Left = 0
          Top = 0
          Width = 388
          Height = 310
          Align = alClient
          BevelOuter = bvNone
          Caption = 'Panel4'
          TabOrder = 1
          object GroupBox1: TGroupBox
            Left = 0
            Top = 0
            Width = 388
            Height = 133
            Align = alTop
            Caption = ' '#1054#1089#1085#1086#1074#1085#1099#1077' '#1089#1074#1086#1081#1089#1090#1074#1072' '
            Constraints.MinHeight = 87
            Font.Charset = DEFAULT_CHARSET
            Font.Color = clWindowText
            Font.Height = -11
            Font.Name = 'MS Sans Serif'
            Font.Style = [fsBold]
            ParentFont = False
            TabOrder = 0
            DesignSize = (
              388
              133)
            object Label1: TLabel
              Left = 41
              Top = 41
              Width = 49
              Height = 13
              Alignment = taRightJustify
              Caption = #1060#1072#1084#1080#1083#1080#1103
              Font.Charset = DEFAULT_CHARSET
              Font.Color = clWindowText
              Font.Height = -11
              Font.Name = 'MS Sans Serif'
              Font.Style = []
              ParentFont = False
            end
            object Label2: TLabel
              Left = 11
              Top = 107
              Width = 79
              Height = 13
              Alignment = taRightJustify
              Caption = #1044#1072#1090#1072' '#1088#1086#1078#1076#1077#1085#1080#1103
              Font.Charset = DEFAULT_CHARSET
              Font.Color = clWindowText
              Font.Height = -11
              Font.Name = 'MS Sans Serif'
              Font.Style = []
              ParentFont = False
            end
            object Label3: TLabel
              Left = 70
              Top = 19
              Width = 20
              Height = 13
              Alignment = taRightJustify
              Caption = #1055#1086#1083
              Font.Charset = DEFAULT_CHARSET
              Font.Color = clWindowText
              Font.Height = -11
              Font.Name = 'MS Sans Serif'
              Font.Style = []
              ParentFont = False
            end
            object Label14: TLabel
              Left = 68
              Top = 63
              Width = 22
              Height = 13
              Alignment = taRightJustify
              Caption = #1048#1084#1103
              Font.Charset = DEFAULT_CHARSET
              Font.Color = clWindowText
              Font.Height = -11
              Font.Name = 'MS Sans Serif'
              Font.Style = []
              ParentFont = False
            end
            object Label15: TLabel
              Left = 43
              Top = 85
              Width = 47
              Height = 13
              Alignment = taRightJustify
              Caption = #1054#1090#1095#1077#1089#1090#1074#1086
              Font.Charset = DEFAULT_CHARSET
              Font.Color = clWindowText
              Font.Height = -11
              Font.Name = 'MS Sans Serif'
              Font.Style = []
              ParentFont = False
            end
            object dbdtBdate: TDBDateTimeEditEh
              Left = 96
              Top = 104
              Width = 73
              Height = 19
              AlwaysShowBorder = True
              DataField = 'BIRTHDATE'
              DataSource = dcsClient
              EditButton.Enabled = False
              EditButton.Visible = False
              EditButtons = <>
              Font.Charset = DEFAULT_CHARSET
              Font.Color = clWindowText
              Font.Height = -11
              Font.Name = 'MS Sans Serif'
              Font.Style = []
              Flat = True
              Kind = dtkDateEh
              ParentFont = False
              ShowHint = True
              TabOrder = 4
              Visible = True
            end
            object cbSex: TDBComboBoxEh
              Left = 96
              Top = 16
              Width = 45
              Height = 19
              AlwaysShowBorder = True
              DataField = 'SEX'
              DataSource = dcsClient
              EditButtons = <>
              Font.Charset = DEFAULT_CHARSET
              Font.Color = clWindowText
              Font.Height = -11
              Font.Name = 'MS Sans Serif'
              Font.Style = []
              Flat = True
              Items.Strings = (
                '?'
                #1052
                #1046)
              KeyItems.Strings = (
                ''
                #1052
                #1046)
              ParentFont = False
              ShowHint = True
              TabOrder = 0
              Visible = True
              OnChange = cbSexExit
            end
            object lcbLName: TDBLookupComboboxEh
              Left = 96
              Top = 38
              Width = 279
              Height = 19
              AlwaysShowBorder = True
              Anchors = [akLeft, akTop, akRight]
              DataField = 'LNAME'
              DataSource = dcsClient
              EditButtons = <>
              Font.Charset = DEFAULT_CHARSET
              Font.Color = clWindowText
              Font.Height = -11
              Font.Name = 'MS Sans Serif'
              Font.Style = []
              Flat = True
              KeyField = 'ID'
              ListField = 'NAME'
              ListSource = dsc_LNames
              ParentFont = False
              ShowHint = True
              Style = csDropDownEh
              TabOrder = 1
              Visible = True
              OnNotInList = lcbLNameNotInList
            end
            object lcbFName: TDBLookupComboboxEh
              Left = 96
              Top = 60
              Width = 279
              Height = 19
              AlwaysShowBorder = True
              Anchors = [akLeft, akTop, akRight]
              DataField = 'FNAME'
              DataSource = dcsClient
              EditButtons = <>
              Font.Charset = DEFAULT_CHARSET
              Font.Color = clWindowText
              Font.Height = -11
              Font.Name = 'MS Sans Serif'
              Font.Style = []
              Flat = True
              KeyField = 'ID'
              ListField = 'NAME'
              ListSource = dsc_FNames
              ParentFont = False
              ShowHint = True
              Style = csDropDownEh
              TabOrder = 2
              Visible = True
              OnExit = lcbFNameExit
              OnNotInList = lcbLNameNotInList
            end
            object lcbSName: TDBLookupComboboxEh
              Left = 96
              Top = 82
              Width = 279
              Height = 19
              AlwaysShowBorder = True
              Anchors = [akLeft, akTop, akRight]
              DataField = 'SNAME'
              DataSource = dcsClient
              EditButtons = <>
              Font.Charset = DEFAULT_CHARSET
              Font.Color = clWindowText
              Font.Height = -11
              Font.Name = 'MS Sans Serif'
              Font.Style = []
              Flat = True
              KeyField = 'ID'
              ListField = 'NAME'
              ListSource = dsc_SNames
              ParentFont = False
              ShowHint = True
              Style = csDropDownEh
              TabOrder = 3
              Visible = True
              OnExit = lcbSNameExit
              OnNotInList = lcbLNameNotInList
            end
          end
          object GroupBox3: TGroupBox
            Left = 0
            Top = 243
            Width = 388
            Height = 67
            Align = alClient
            Caption = ' '#1052#1077#1089#1090#1086' '#1088#1072#1073#1086#1090#1099' '
            Font.Charset = DEFAULT_CHARSET
            Font.Color = clWindowText
            Font.Height = -11
            Font.Name = 'MS Sans Serif'
            Font.Style = [fsBold]
            ParentFont = False
            TabOrder = 2
            DesignSize = (
              388
              67)
            object Label7: TLabel
              Left = 23
              Top = 19
              Width = 67
              Height = 13
              Alignment = taRightJustify
              Caption = #1054#1088#1075#1072#1085#1080#1079#1072#1094#1080#1103
              Font.Charset = DEFAULT_CHARSET
              Font.Color = clWindowText
              Font.Height = -11
              Font.Name = 'MS Sans Serif'
              Font.Style = []
              ParentFont = False
            end
            object Label8: TLabel
              Left = 32
              Top = 41
              Width = 58
              Height = 13
              Alignment = taRightJustify
              Caption = #1044#1086#1083#1078#1085#1086#1089#1090#1100
              Font.Charset = DEFAULT_CHARSET
              Font.Color = clWindowText
              Font.Height = -11
              Font.Name = 'MS Sans Serif'
              Font.Style = []
              ParentFont = False
            end
            object dbeWorkplace: TDBEditEh
              Left = 96
              Top = 16
              Width = 281
              Height = 19
              AlwaysShowBorder = True
              Anchors = [akLeft, akTop, akRight]
              DataField = 'WORKPLACE'
              DataSource = dcsClient
              EditButtons = <>
              Font.Charset = DEFAULT_CHARSET
              Font.Color = clWindowText
              Font.Height = -11
              Font.Name = 'MS Sans Serif'
              Font.Style = []
              Flat = True
              ParentFont = False
              ShowHint = True
              TabOrder = 0
              Visible = True
            end
            object dbeRank: TDBEditEh
              Left = 96
              Top = 38
              Width = 281
              Height = 19
              AlwaysShowBorder = True
              Anchors = [akLeft, akTop, akRight]
              DataField = 'RANK'
              DataSource = dcsClient
              EditButtons = <>
              Font.Charset = DEFAULT_CHARSET
              Font.Color = clWindowText
              Font.Height = -11
              Font.Name = 'MS Sans Serif'
              Font.Style = []
              Flat = True
              ParentFont = False
              ShowHint = True
              TabOrder = 1
              Visible = True
            end
          end
          object GroupBox4: TGroupBox
            Left = 0
            Top = 133
            Width = 388
            Height = 110
            Align = alTop
            Caption = ' '#1048#1076#1077#1085#1090#1080#1092#1080#1082#1072#1094#1080#1103' '
            Font.Charset = DEFAULT_CHARSET
            Font.Color = clWindowText
            Font.Height = -11
            Font.Name = 'MS Sans Serif'
            Font.Style = [fsBold]
            ParentFont = False
            TabOrder = 1
            DesignSize = (
              388
              110)
            object Label9: TLabel
              Left = 66
              Top = 19
              Width = 24
              Height = 13
              Alignment = taRightJustify
              Caption = #1059#1048#1053
              Font.Charset = DEFAULT_CHARSET
              Font.Color = clWindowText
              Font.Height = -11
              Font.Name = 'MS Sans Serif'
              Font.Style = []
              ParentFont = False
            end
            object Label10: TLabel
              Left = 62
              Top = 41
              Width = 28
              Height = 13
              Alignment = taRightJustify
              Caption = #1057#1043#1055#1057
              Font.Charset = DEFAULT_CHARSET
              Font.Color = clWindowText
              Font.Height = -11
              Font.Name = 'MS Sans Serif'
              Font.Style = []
              ParentFont = False
            end
            object Label11: TLabel
              Left = 66
              Top = 63
              Width = 24
              Height = 13
              Alignment = taRightJustify
              Caption = #1048#1053#1053
              Font.Charset = DEFAULT_CHARSET
              Font.Color = clWindowText
              Font.Height = -11
              Font.Name = 'MS Sans Serif'
              Font.Style = []
              ParentFont = False
            end
            object Label4: TLabel
              Left = 45
              Top = 85
              Width = 45
              Height = 13
              Alignment = taRightJustify
              Caption = #1058#1077#1083#1077#1092#1086#1085
              Font.Charset = DEFAULT_CHARSET
              Font.Color = clWindowText
              Font.Height = -11
              Font.Name = 'MS Sans Serif'
              Font.Style = []
              ParentFont = False
            end
            object dbeTenId: TDBEditEh
              Left = 96
              Top = 16
              Width = 281
              Height = 19
              AlwaysShowBorder = True
              Anchors = [akLeft, akTop, akRight]
              DataField = 'TEN_ID'
              DataSource = dcsClient
              EditButtons = <>
              Font.Charset = DEFAULT_CHARSET
              Font.Color = clWindowText
              Font.Height = -11
              Font.Name = 'MS Sans Serif'
              Font.Style = []
              Flat = True
              ParentFont = False
              ShowHint = True
              TabOrder = 0
              Visible = True
            end
            object dbeSGPS: TDBEditEh
              Left = 96
              Top = 38
              Width = 281
              Height = 19
              AlwaysShowBorder = True
              Anchors = [akLeft, akTop, akRight]
              DataField = 'SGPS'
              DataSource = dcsClient
              EditButtons = <>
              Font.Charset = DEFAULT_CHARSET
              Font.Color = clWindowText
              Font.Height = -11
              Font.Name = 'MS Sans Serif'
              Font.Style = []
              Flat = True
              ParentFont = False
              ShowHint = True
              TabOrder = 1
              Visible = True
            end
            object dbeINN: TDBEditEh
              Left = 96
              Top = 60
              Width = 281
              Height = 19
              AlwaysShowBorder = True
              Anchors = [akLeft, akTop, akRight]
              DataField = 'INN'
              DataSource = dcsClient
              EditButtons = <>
              Font.Charset = DEFAULT_CHARSET
              Font.Color = clWindowText
              Font.Height = -11
              Font.Name = 'MS Sans Serif'
              Font.Style = []
              Flat = True
              ParentFont = False
              ShowHint = True
              TabOrder = 2
              Visible = True
            end
            object dbePhone: TDBEditEh
              Left = 96
              Top = 82
              Width = 281
              Height = 19
              AlwaysShowBorder = True
              Anchors = [akLeft, akTop, akRight]
              DataField = 'PHONE'
              DataSource = dcsClient
              EditButtons = <>
              Font.Charset = DEFAULT_CHARSET
              Font.Color = clWindowText
              Font.Height = -11
              Font.Name = 'MS Sans Serif'
              Font.Style = []
              Flat = True
              ParentFont = False
              ShowHint = True
              TabOrder = 3
              Visible = True
            end
          end
        end
      end
    end
    object tsExempts: TTabSheet
      Caption = #1057#1086#1094#1079#1072#1097#1080#1090#1072
      OnShow = tsExemptsShow
      object GroupBox5: TGroupBox
        Left = 0
        Top = 0
        Width = 784
        Height = 310
        Align = alClient
        Caption = ' '#1051#1100#1075#1086#1090#1099' '
        TabOrder = 0
        object DBGridEh1: TDBGridEh
          Left = 2
          Top = 38
          Width = 780
          Height = 270
          Hint = #1057#1087#1080#1089#1086#1082' '#1083#1100#1075#1086#1090' '#1075#1088#1072#1078#1076#1072#1085#1080#1085#1072
          Align = alClient
          DataGrouping.GroupLevels = <>
          DataSource = dscExempts
          Flat = True
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clWindowText
          Font.Height = -11
          Font.Name = 'MS Sans Serif'
          Font.Style = []
          FooterColor = clWindow
          FooterFont.Charset = DEFAULT_CHARSET
          FooterFont.Color = clWindowText
          FooterFont.Height = -11
          FooterFont.Name = 'MS Sans Serif'
          FooterFont.Style = [fsBold]
          Options = [dgTitles, dgColumnResize, dgColLines, dgRowLines, dgTabs, dgRowSelect, dgConfirmDelete, dgCancelOnExit]
          ParentFont = False
          RowDetailPanel.Color = clBtnFace
          TabOrder = 0
          TitleFont.Charset = DEFAULT_CHARSET
          TitleFont.Color = clWindowText
          TitleFont.Height = -11
          TitleFont.Name = 'MS Sans Serif'
          TitleFont.Style = [fsBold]
          UseMultiTitle = True
          VTitleMargin = 5
          OnDblClick = aExemptEditExecute
          Columns = <
            item
              EditButtons = <>
              FieldName = 'CLIENT_ID'
              Footers = <>
              Visible = False
            end
            item
              EditButtons = <>
              FieldName = 'EXEMPTTYPES_ID'
              Footers = <>
              Visible = False
            end
            item
              EditButtons = <>
              FieldName = 'NAME'
              Footers = <>
              Title.Font.Charset = DEFAULT_CHARSET
              Title.Font.Color = clWindowText
              Title.Font.Height = -11
              Title.Font.Name = 'MS Sans Serif'
              Title.Font.Style = []
              Width = 174
            end
            item
              EditButtons = <>
              FieldName = 'EXEMPT_DOC'
              Footers = <>
              Title.Font.Charset = DEFAULT_CHARSET
              Title.Font.Color = clWindowText
              Title.Font.Height = -11
              Title.Font.Name = 'MS Sans Serif'
              Title.Font.Style = []
              Width = 100
            end
            item
              EditButtons = <>
              FieldName = 'DOC_SERIAL'
              Footers = <>
              Title.Font.Charset = DEFAULT_CHARSET
              Title.Font.Color = clWindowText
              Title.Font.Height = -11
              Title.Font.Name = 'MS Sans Serif'
              Title.Font.Style = []
            end
            item
              EditButtons = <>
              FieldName = 'DOC_NUM'
              Footers = <>
              Title.Font.Charset = DEFAULT_CHARSET
              Title.Font.Color = clWindowText
              Title.Font.Height = -11
              Title.Font.Name = 'MS Sans Serif'
              Title.Font.Style = []
            end
            item
              EditButtons = <>
              FieldName = 'DOC_DATE'
              Footers = <>
              Title.Font.Charset = DEFAULT_CHARSET
              Title.Font.Color = clWindowText
              Title.Font.Height = -11
              Title.Font.Name = 'MS Sans Serif'
              Title.Font.Style = []
            end
            item
              EditButtons = <>
              FieldName = 'EXEMPT_BDATE'
              Footers = <>
              Title.Font.Charset = DEFAULT_CHARSET
              Title.Font.Color = clWindowText
              Title.Font.Height = -11
              Title.Font.Name = 'MS Sans Serif'
              Title.Font.Style = []
              Width = 79
            end
            item
              EditButtons = <>
              FieldName = 'EXEMPT_EDATE'
              Footers = <>
              Title.Font.Charset = DEFAULT_CHARSET
              Title.Font.Color = clWindowText
              Title.Font.Height = -11
              Title.Font.Name = 'MS Sans Serif'
              Title.Font.Style = []
              Width = 77
            end
            item
              EditButtons = <>
              FieldName = 'ADD_SQ'
              Footers = <>
              Title.Font.Charset = DEFAULT_CHARSET
              Title.Font.Color = clWindowText
              Title.Font.Height = -11
              Title.Font.Name = 'MS Sans Serif'
              Title.Font.Style = []
              Width = 73
            end
            item
              EditButtons = <>
              FieldName = 'USERCNAME'
              Footers = <>
              Title.Font.Charset = DEFAULT_CHARSET
              Title.Font.Color = clWindowText
              Title.Font.Height = -11
              Title.Font.Name = 'MS Sans Serif'
              Title.Font.Style = []
              Width = 58
            end
            item
              EditButtons = <>
              FieldName = 'CREATEDATE'
              Footers = <>
              Title.Font.Charset = DEFAULT_CHARSET
              Title.Font.Color = clWindowText
              Title.Font.Height = -11
              Title.Font.Name = 'MS Sans Serif'
              Title.Font.Style = []
              Width = 47
            end
            item
              EditButtons = <>
              FieldName = 'USERMNAME'
              Footers = <>
              Title.Font.Charset = DEFAULT_CHARSET
              Title.Font.Color = clWindowText
              Title.Font.Height = -11
              Title.Font.Name = 'MS Sans Serif'
              Title.Font.Style = []
              Width = 100
            end
            item
              EditButtons = <>
              FieldName = 'MODIFYDATE'
              Footers = <>
              Title.Font.Charset = DEFAULT_CHARSET
              Title.Font.Color = clWindowText
              Title.Font.Height = -11
              Title.Font.Name = 'MS Sans Serif'
              Title.Font.Style = []
              Width = 61
            end>
          object RowDetailData: TRowDetailPanelControlEh
          end
        end
        object ToolBar2: TToolBar
          Left = 2
          Top = 15
          Width = 780
          Height = 23
          Caption = 'ToolBar2'
          EdgeBorders = []
          Flat = True
          Images = MAIN.ImageList
          TabOrder = 1
          object ToolButton5: TToolButton
            Left = 0
            Top = 0
            Action = aExemptNew
          end
          object ToolButton6: TToolButton
            Left = 23
            Top = 0
            Action = aExemptEdit
          end
          object ToolButton7: TToolButton
            Left = 46
            Top = 0
            Width = 8
            Caption = 'ToolButton7'
            ImageIndex = 2
            Style = tbsSeparator
          end
          object ToolButton8: TToolButton
            Left = 54
            Top = 0
            Action = aExemptDel
          end
          object Panel6: TPanel
            Left = 77
            Top = 0
            Width = 20
            Height = 22
            BevelOuter = bvNone
            TabOrder = 1
          end
          object Label13: TLabel
            Left = 97
            Top = 0
            Width = 109
            Height = 13
            Caption = #1044#1077#1077#1089#1087#1086#1089#1086#1073#1085#1086#1089#1090#1100'  '
            Layout = tlCenter
          end
          object dblcListWorkAbility: TDBLookupComboboxEh
            Left = 206
            Top = 0
            Width = 126
            Height = 22
            AlwaysShowBorder = True
            DataField = 'WORKABILITY'
            DataSource = dcsClient
            EditButtons = <>
            Flat = True
            KeyField = 'ID'
            ListField = 'NAME'
            ListSource = dscListWorkAbility
            ShowHint = True
            TabOrder = 0
            Visible = True
            OnChange = dblcListWorkAbilityChange
          end
          object Panel5: TPanel
            Left = 332
            Top = 0
            Width = 20
            Height = 22
            BevelOuter = bvNone
            TabOrder = 3
          end
          object dbcbLGOT_RECIVE: TDBCheckBoxEh
            Left = 352
            Top = 0
            Width = 289
            Height = 22
            Alignment = taLeftJustify
            AlwaysShowBorder = True
            Caption = #1055#1088#1077#1076#1086#1089#1090#1072#1074#1083#1103#1090#1100' '#1083#1100#1075#1086#1090#1091' '#1087#1086' '#1084#1077#1089#1090#1091' '#1087#1088#1077#1073#1099#1074#1072#1085#1080#1103
            DataField = 'LGOT_RECIVE'
            DataSource = dcsClient
            Flat = True
            TabOrder = 2
            ValueChecked = '1'
            ValueUnchecked = '0'
          end
        end
      end
    end
    object tsFamily: TTabSheet
      Caption = #1056#1086#1076#1089#1090#1074#1077#1085#1085#1099#1077' '#1089#1074#1103#1079#1080
      ImageIndex = 2
      OnShow = tsFamilyShow
      object DBGridEh3: TDBGridEh
        Left = 0
        Top = 23
        Width = 784
        Height = 287
        Hint = #1057#1087#1080#1089#1086#1082' '#1076#1086#1082#1091#1084#1077#1085#1090#1086#1074' '#1086' '#1076#1086#1093#1086#1076#1072#1093' '#1075#1088#1072#1078#1076#1072#1085#1080#1085#1072
        Align = alClient
        DataGrouping.GroupLevels = <>
        DataSource = dscFamily
        Flat = True
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clWindowText
        Font.Height = -11
        Font.Name = 'MS Sans Serif'
        Font.Style = []
        FooterColor = clWindow
        FooterFont.Charset = DEFAULT_CHARSET
        FooterFont.Color = clWindowText
        FooterFont.Height = -11
        FooterFont.Name = 'MS Sans Serif'
        FooterFont.Style = [fsBold]
        Options = [dgTitles, dgColumnResize, dgColLines, dgRowLines, dgTabs, dgRowSelect, dgConfirmDelete, dgCancelOnExit]
        ParentFont = False
        RowDetailPanel.Color = clBtnFace
        TabOrder = 0
        TitleFont.Charset = DEFAULT_CHARSET
        TitleFont.Color = clWindowText
        TitleFont.Height = -11
        TitleFont.Name = 'MS Sans Serif'
        TitleFont.Style = []
        UseMultiTitle = True
        VTitleMargin = 5
        Columns = <
          item
            EditButtons = <>
            FieldName = 'NAME'
            Footers = <>
            Width = 196
          end
          item
            EditButtons = <>
            FieldName = 'SEX'
            Footers = <>
            Width = 43
          end
          item
            EditButtons = <>
            FieldName = 'RELATION'
            Footers = <>
            Width = 273
          end
          item
            EditButtons = <>
            FieldName = 'BDATE'
            Footers = <>
            Width = 85
          end
          item
            EditButtons = <>
            FieldName = 'EDATE'
            Footers = <>
            Width = 91
          end>
        object RowDetailData: TRowDetailPanelControlEh
        end
      end
      object ToolBar5: TToolBar
        Left = 0
        Top = 0
        Width = 784
        Height = 23
        Caption = 'ToolBar2'
        EdgeBorders = []
        Flat = True
        Images = MAIN.ImageList
        TabOrder = 1
        object ToolButton16: TToolButton
          Left = 0
          Top = 0
          Action = aKindsmanNew
        end
        object ToolButton17: TToolButton
          Left = 23
          Top = 0
          Action = aKindsmanEdit
        end
        object ToolButton18: TToolButton
          Left = 46
          Top = 0
          Width = 8
          Caption = 'ToolButton7'
          ImageIndex = 2
          Style = tbsSeparator
        end
        object ToolButton19: TToolButton
          Left = 54
          Top = 0
          Action = aKindsmanDel
        end
      end
    end
    object tsHistory: TTabSheet
      Caption = #1048#1089#1090#1086#1088#1080#1103
      ImageIndex = 3
      OnShow = tsHistoryShow
      object DBGridEh4: TDBGridEh
        Left = 0
        Top = 23
        Width = 784
        Height = 217
        Hint = #1057#1087#1080#1089#1086#1082' '#1076#1086#1082#1091#1084#1077#1085#1090#1086#1074' '#1086' '#1076#1086#1093#1086#1076#1072#1093' '#1075#1088#1072#1078#1076#1072#1085#1080#1085#1072
        Align = alClient
        DataGrouping.GroupLevels = <>
        DataSource = dscClientHistr
        Flat = True
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clWindowText
        Font.Height = -11
        Font.Name = 'MS Sans Serif'
        Font.Style = []
        FooterColor = clWindow
        FooterFont.Charset = DEFAULT_CHARSET
        FooterFont.Color = clWindowText
        FooterFont.Height = -11
        FooterFont.Name = 'MS Sans Serif'
        FooterFont.Style = [fsBold]
        Options = [dgTitles, dgColumnResize, dgColLines, dgRowLines, dgTabs, dgRowSelect, dgConfirmDelete, dgCancelOnExit]
        ParentFont = False
        RowDetailPanel.Color = clBtnFace
        TabOrder = 0
        TitleFont.Charset = DEFAULT_CHARSET
        TitleFont.Color = clWindowText
        TitleFont.Height = -11
        TitleFont.Name = 'MS Sans Serif'
        TitleFont.Style = []
        UseMultiTitle = True
        VTitleMargin = 5
        Columns = <
          item
            EditButtons = <>
            FieldName = 'FIELD_NAME'
            Footers = <>
            Width = 165
          end
          item
            EditButtons = <>
            FieldName = 'DOCDATE'
            Footers = <>
            Width = 100
          end
          item
            EditButtons = <>
            FieldName = 'OLD_VALUE'
            Footers = <>
            Width = 100
          end
          item
            EditButtons = <>
            FieldName = 'NEW_VALUE'
            Footers = <>
            Width = 100
          end
          item
            EditButtons = <>
            FieldName = 'CREATOR'
            Footers = <>
            Width = 100
          end
          item
            EditButtons = <>
            FieldName = 'CREATEDATE'
            Footers = <>
            Width = 100
          end>
        object RowDetailData: TRowDetailPanelControlEh
        end
      end
      object GroupBox9: TGroupBox
        Left = 0
        Top = 240
        Width = 784
        Height = 70
        Align = alBottom
        Caption = ' '#1057#1083#1091#1078#1077#1073#1085#1099#1077' '#1076#1072#1085#1085#1099#1077' '
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clWindowText
        Font.Height = -11
        Font.Name = 'MS Sans Serif'
        Font.Style = [fsBold]
        ParentFont = False
        TabOrder = 1
        object Label26: TLabel
          Left = 30
          Top = 20
          Width = 37
          Height = 13
          Alignment = taRightJustify
          Caption = #1057#1086#1079#1076#1072#1083
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clWindowText
          Font.Height = -11
          Font.Name = 'MS Sans Serif'
          Font.Style = []
          ParentFont = False
        end
        object Label27: TLabel
          Left = 214
          Top = 20
          Width = 77
          Height = 13
          Alignment = taRightJustify
          Caption = #1044#1072#1090#1072' '#1089#1086#1079#1076#1072#1085#1080#1103
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clWindowText
          Font.Height = -11
          Font.Name = 'MS Sans Serif'
          Font.Style = []
          ParentFont = False
        end
        object Label28: TLabel
          Left = 21
          Top = 44
          Width = 46
          Height = 13
          Alignment = taRightJustify
          Caption = #1048#1079#1084#1077#1085#1080#1083
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clWindowText
          Font.Height = -11
          Font.Name = 'MS Sans Serif'
          Font.Style = []
          ParentFont = False
        end
        object Label29: TLabel
          Left = 206
          Top = 44
          Width = 85
          Height = 13
          Alignment = taRightJustify
          Caption = #1044#1072#1090#1072' '#1080#1079#1084#1077#1085#1077#1085#1080#1103
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clWindowText
          Font.Height = -11
          Font.Name = 'MS Sans Serif'
          Font.Style = []
          ParentFont = False
        end
        object Label42: TLabel
          Left = 462
          Top = 20
          Width = 17
          Height = 13
          Alignment = taRightJustify
          Caption = #1048#1044
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clWindowText
          Font.Height = -11
          Font.Name = 'MS Sans Serif'
          Font.Style = []
          ParentFont = False
        end
        object dbeCreater: TDBEditEh
          Left = 72
          Top = 16
          Width = 121
          Height = 21
          TabStop = False
          AlwaysShowBorder = True
          Color = clInactiveCaptionText
          Ctl3D = True
          DataField = 'CREATEUSER'
          DataSource = dcsClient
          EditButtons = <>
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clWindowText
          Font.Height = -11
          Font.Name = 'MS Sans Serif'
          Font.Style = []
          Flat = True
          ParentCtl3D = False
          ParentFont = False
          ReadOnly = True
          ShowHint = True
          TabOrder = 0
          Visible = True
        end
        object dbeModifier: TDBEditEh
          Left = 72
          Top = 40
          Width = 121
          Height = 21
          TabStop = False
          AlwaysShowBorder = True
          Color = clInactiveCaptionText
          Ctl3D = True
          DataField = 'MODIFYUSER'
          DataSource = dcsClient
          EditButtons = <>
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clWindowText
          Font.Height = -11
          Font.Name = 'MS Sans Serif'
          Font.Style = []
          Flat = True
          ParentCtl3D = False
          ParentFont = False
          ReadOnly = True
          ShowHint = True
          TabOrder = 1
          Visible = True
        end
        object dbeID: TDBEditEh
          Left = 484
          Top = 16
          Width = 121
          Height = 21
          TabStop = False
          AlwaysShowBorder = True
          Color = clInactiveCaptionText
          Ctl3D = True
          DataField = 'ID'
          DataSource = dcsClient
          EditButtons = <>
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clWindowText
          Font.Height = -11
          Font.Name = 'MS Sans Serif'
          Font.Style = []
          Flat = True
          ParentCtl3D = False
          ParentFont = False
          ReadOnly = True
          ShowHint = True
          TabOrder = 2
          Visible = True
        end
        object dteModifyDate: TDBDateTimeEditEh
          Left = 296
          Top = 40
          Width = 121
          Height = 21
          TabStop = False
          AlwaysShowBorder = True
          Color = clInactiveCaptionText
          DataField = 'MODIFYDATE'
          DataSource = dcsClient
          Enabled = False
          EditButtons = <>
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clWindowText
          Font.Height = -11
          Font.Name = 'MS Sans Serif'
          Font.Style = []
          Flat = True
          Kind = dtkDateEh
          ParentFont = False
          ReadOnly = True
          ShowHint = True
          TabOrder = 3
          Visible = True
        end
        object dteCreateDate: TDBDateTimeEditEh
          Left = 296
          Top = 16
          Width = 121
          Height = 21
          TabStop = False
          AlwaysShowBorder = True
          Color = clInactiveCaptionText
          DataField = 'CREATEDATE'
          DataSource = dcsClient
          Enabled = False
          EditButtons = <>
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clWindowText
          Font.Height = -11
          Font.Name = 'MS Sans Serif'
          Font.Style = []
          Flat = True
          Kind = dtkDateEh
          ParentFont = False
          ReadOnly = True
          ShowHint = True
          TabOrder = 4
          Visible = True
        end
      end
      object ToolBar4: TToolBar
        Left = 0
        Top = 0
        Width = 784
        Height = 23
        Caption = 'ToolBar2'
        EdgeBorders = []
        Flat = True
        Images = MAIN.ImageList
        TabOrder = 2
        object ToolButton15: TToolButton
          Left = 0
          Top = 0
          Action = aTenHistPropDel
        end
      end
    end
    object tsPassDocs: TTabSheet
      Caption = #1055#1072#1089#1087#1086#1088#1090#1085#1099#1077' '#1076#1072#1085#1085#1099#1077
      ImageIndex = 4
      OnShow = tsPassDocsShow
      object Label16: TLabel
        Left = 266
        Top = 106
        Width = 206
        Height = 13
        Caption = #1055#1086' '#1076#1086#1084#1091' '#1074#1077#1076#1077#1090#1089#1103' '#1087#1072#1089#1087#1086#1088#1090#1085#1099#1081' '#1091#1095#1077#1090
      end
      object pPassDocs: TPanel
        Left = 0
        Top = 0
        Width = 784
        Height = 310
        Align = alClient
        BevelOuter = bvNone
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clWindowText
        Font.Height = -11
        Font.Name = 'MS Sans Serif'
        Font.Style = []
        ParentFont = False
        TabOrder = 0
        object ToolBar6: TToolBar
          Left = 0
          Top = 0
          Width = 784
          Height = 23
          Caption = 'ToolBar2'
          EdgeBorders = []
          Flat = True
          Images = MAIN.ImageList
          TabOrder = 0
          object ToolButton10: TToolButton
            Left = 0
            Top = 0
            Action = aDocNew
          end
          object ToolButton13: TToolButton
            Left = 23
            Top = 0
            Action = aDocEdit
          end
          object ToolButton14: TToolButton
            Left = 46
            Top = 0
            Width = 8
            Caption = 'ToolButton7'
            ImageIndex = 2
            Style = tbsSeparator
          end
          object ToolButton20: TToolButton
            Left = 54
            Top = 0
            Action = aDocDel
          end
        end
        object DocsGrid: TDBGridEh
          Left = 0
          Top = 23
          Width = 784
          Height = 287
          Align = alClient
          DataGrouping.GroupLevels = <>
          DataSource = dscDocs
          Flat = True
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clWindowText
          Font.Height = -11
          Font.Name = 'MS Sans Serif'
          Font.Style = []
          FooterColor = clWindow
          FooterFont.Charset = DEFAULT_CHARSET
          FooterFont.Color = clWindowText
          FooterFont.Height = -11
          FooterFont.Name = 'MS Sans Serif'
          FooterFont.Style = [fsBold]
          Options = [dgTitles, dgColumnResize, dgColLines, dgRowLines, dgTabs, dgRowSelect, dgConfirmDelete, dgCancelOnExit]
          ParentFont = False
          RowDetailPanel.Color = clBtnFace
          TabOrder = 1
          TitleFont.Charset = DEFAULT_CHARSET
          TitleFont.Color = clWindowText
          TitleFont.Height = -11
          TitleFont.Name = 'MS Sans Serif'
          TitleFont.Style = []
          UseMultiTitle = True
          VTitleMargin = 5
          Columns = <
            item
              EditButtons = <>
              FieldName = 'ID'
              Footers = <>
            end
            item
              EditButtons = <>
              FieldName = 'DOC_TYPE'
              Footers = <>
            end
            item
              EditButtons = <>
              FieldName = 'SERIAL'
              Footers = <>
            end
            item
              EditButtons = <>
              FieldName = 'NUMBER'
              Footers = <>
            end
            item
              EditButtons = <>
              FieldName = 'ORGAN'
              Footers = <>
            end
            item
              EditButtons = <>
              FieldName = 'BDATE'
              Footers = <>
            end
            item
              EditButtons = <>
              FieldName = 'EDATE'
              Footers = <>
            end
            item
              EditButtons = <>
              FieldName = 'CREATEDATE'
              Footers = <>
            end
            item
              EditButtons = <>
              FieldName = 'CREATEUSER'
              Footers = <>
            end>
          object RowDetailData: TRowDetailPanelControlEh
          end
        end
      end
    end
  end
  inherited ActionList1: TActionList
    Images = MAIN.ImageList
    Left = 462
    Top = 16
    inherited aSave: TAction
      OnExecute = aSaveExecute
    end
    inherited aCancel: TAction
      OnExecute = aCancelExecute
    end
    inherited aPrint: TAction
      OnExecute = aPrintExecute
    end
    object aTenHistrNew: TAction
      Caption = #1053#1086#1074#1072#1103' '#1079#1072#1087#1080#1089#1100' '#1074' '#1080#1089#1090#1086#1088#1080#1102' '#1089#1090#1072#1090#1091#1089#1086#1074
      ImageIndex = 9
      OnExecute = aTenHistrNewExecute
    end
    object aTenHistrDel: TAction
      Caption = #1059#1076#1072#1083#1080#1090#1100' '#1079#1072#1087#1080#1089#1100' '#1080#1079' '#1080#1089#1090#1086#1088#1080#1080' '#1089#1090#1072#1090#1091#1089#1086#1074
      ImageIndex = 2
      OnExecute = aTenHistrDelExecute
    end
    object aExemptNew: TAction
      Caption = #1044#1086#1073#1072#1074#1080#1090#1100' '#1083#1100#1075#1086#1090#1091
      Hint = #1044#1086#1073#1072#1074#1080#1090#1100' '#1083#1100#1075#1086#1090#1091
      ImageIndex = 9
      OnExecute = aExemptNewExecute
    end
    object aExemptEdit: TAction
      Caption = #1048#1079#1084#1077#1085#1080#1090#1100' '#1083#1100#1075#1086#1090#1091
      Hint = #1048#1079#1084#1077#1085#1080#1090#1100' '#1083#1100#1075#1086#1090#1091
      ImageIndex = 5
      OnExecute = aExemptEditExecute
    end
    object aExemptDel: TAction
      Caption = #1059#1076#1072#1083#1080#1090#1100' '#1083#1100#1075#1086#1090#1091
      Hint = #1059#1076#1072#1083#1080#1090#1100' '#1083#1100#1075#1086#1090#1091
      ImageIndex = 2
      OnExecute = aExemptDelExecute
    end
    object aKindsmanNew: TAction
      Caption = #1044#1086#1073#1072#1074#1080#1090#1100' '#1088#1086#1076#1089#1090#1074#1077#1085#1085#1091#1102' '#1089#1074#1103#1079#1100
      Hint = #1044#1086#1073#1072#1074#1080#1090#1100' '#1088#1086#1076#1089#1090#1074#1077#1085#1085#1091#1102' '#1089#1074#1103#1079#1100
      ImageIndex = 9
      OnExecute = aKindsmanNewExecute
    end
    object aKindsmanEdit: TAction
      Caption = #1048#1079#1084#1077#1085#1080#1090#1100' '#1088#1086#1076#1089#1090#1074#1077#1085#1085#1091#1102' '#1089#1074#1103#1079#1100
      Hint = #1048#1079#1084#1077#1085#1080#1090#1100' '#1088#1086#1076#1089#1090#1074#1077#1085#1085#1091#1102' '#1089#1074#1103#1079#1100
      ImageIndex = 5
      OnExecute = aKindsmanEditExecute
    end
    object aKindsmanDel: TAction
      Caption = #1059#1076#1072#1083#1080#1090#1100' '#1088#1086#1076#1089#1090#1074#1077#1085#1085#1091#1102' '#1089#1074#1103#1079#1100
      Hint = #1059#1076#1072#1083#1080#1090#1100' '#1088#1086#1076#1089#1090#1074#1077#1085#1085#1091#1102' '#1089#1074#1103#1079#1100
      ImageIndex = 2
      OnExecute = aKindsmanDelExecute
    end
    object aTenHistPropDel: TAction
      Caption = #1059#1076#1072#1083#1080#1090#1100' '#1079#1072#1087#1080#1089#1100
      Hint = #1059#1076#1072#1083#1080#1090#1100' '#1079#1072#1087#1080#1089#1100' '#1080#1079' '#1080#1089#1090#1086#1088#1080#1080' '#1089#1074#1086#1081#1089#1090#1074' '#1075#1088#1072#1078#1076#1072#1085#1080#1085#1072
      ImageIndex = 2
      OnExecute = aTenHistPropDelExecute
    end
    object aDocNew: TAction
      Caption = #1053#1086#1074#1099#1081' '#1076#1086#1082#1091#1084#1077#1085#1090
      ImageIndex = 9
      OnExecute = aDocNewExecute
    end
    object aDocEdit: TAction
      Caption = #1055#1088#1072#1074#1080#1090#1100' '#1076#1086#1082#1091#1084#1077#1085#1090
      ImageIndex = 5
      OnExecute = aDocEditExecute
    end
    object aDocDel: TAction
      Caption = #1059#1076#1072#1083#1080#1090#1100' '#1076#1086#1082#1091#1084#1077#1085#1090
      ImageIndex = 2
      OnExecute = aDocDelExecute
    end
  end
  inherited PropStorage: TPropStorageEh
    Section = 'crdTenant'
    StoredProps.Strings = (
      '<P>.Height'
      '<P>.Left'
      '<P>.PixelsPerInch'
      '<P>.Top'
      '<P>.Width'
      '<P>.WindowState'
      'pgcTenantAddProps.<P>.ActivePage'
      
        'pgcTenantAddProps.tsExempts.GroupBox5.DBGridEh1.<P>.Columns.Colu' +
        'mnsIndex'
      
        'pgcTenantAddProps.tsExempts.GroupBox5.DBGridEh1.<P>.Columns.<For' +
        'AllItems>.Width'
      'pgcTenantAddProps.tsFamily.DBGridEh3.<P>.Columns.ColumnsIndex'
      
        'pgcTenantAddProps.tsFamily.DBGridEh3.<P>.Columns.<ForAllItems>.W' +
        'idth'
      'pgcTenantAddProps.tsHistory.DBGridEh4.<P>.Columns.ColumnsIndex'
      
        'pgcTenantAddProps.tsHistory.DBGridEh4.<P>.Columns.<ForAllItems>.' +
        'Width'
      
        'pgcTenantAddProps.tsTenant.Panel2.Panel3.GroupBox2.pcPropis.<P>.' +
        'ActivePage'
      
        'pgcTenantAddProps.tsTenant.Panel2.Panel3.GroupBox2.pcPropis.tsPr' +
        'opisHist.dbgPropisHist.<P>.Columns.ColumnsIndex'
      
        'pgcTenantAddProps.tsTenant.Panel2.Panel3.GroupBox2.pcPropis.tsPr' +
        'opisHist.dbgPropisHist.<P>.Columns.<ForAllItems>.Width')
    Left = 432
    Top = 16
  end
  object dsClientStatus: TpFIBDataSet
    SelectSQL.Strings = (
      'select RABONENT_ID,'
      'RSTATUS,'
      'RDOCDATE,'
      'REDATE,'
      
        '(select first(1) d.status_name from clients_oper_types d where d' +
        '.status_code = pgs.rstatus) as status,'
      
        '(select address from v_abons a where a.id = pgs.RABONENT_ID) as ' +
        'address'
      'from proc_client_get_status(:pclient_id, current_date) pgs'
      
        'order by iif(:pabonent_id = pgs.RABONENT_ID, 0, 1), rdocdate des' +
        'c')
    AfterOpen = dsClientStatusAfterOpen
    BeforeOpen = dsClientStatusBeforeOpen
    Transaction = trTenant
    Database = MAINDM.pMainDatabase
    UpdateTransaction = UpdateTrans
    Container = DSContainer
    Left = 568
    Top = 133
    object dsClientStatusADDRESS: TFIBStringField
      DisplayLabel = #1040#1076#1088#1077#1089
      DisplayWidth = 150
      FieldName = 'ADDRESS'
      Size = 245
      EmptyStrToNull = True
    end
    object dsClientStatusSTATUS: TFIBStringField
      DisplayLabel = #1057#1090#1072#1090#1091#1089
      DisplayWidth = 8
      FieldName = 'STATUS'
      Size = 10
      EmptyStrToNull = True
    end
    object dsClientStatusRDOCDATE: TFIBDateField
      DisplayLabel = #1057' '#1076#1072#1090#1099
      FieldName = 'RDOCDATE'
    end
    object dsClientStatusREDATE: TFIBDateField
      DisplayLabel = #1055#1086' '#1076#1072#1090#1091
      FieldName = 'REDATE'
    end
    object dsClientStatusRABONENT_ID: TFIBIntegerField
      FieldName = 'RABONENT_ID'
    end
    object dsClientStatusRSTATUS: TFIBIntegerField
      FieldName = 'RSTATUS'
    end
  end
  object trTenant: TpFIBTransaction
    DefaultDatabase = MAINDM.pMainDatabase
    TimeoutAction = TARollback
    Left = 566
    Top = 57
  end
  object dsClient: TpFIBDataSet
    UpdateSQL.Strings = (
      'UPDATE CLIENTS'
      'SET '
      '    FNAME = :FNAME,'
      '    SNAME = :SNAME,'
      '    LNAME = :LNAME,'
      '    BIRTHDATE = :BIRTHDATE,'
      '    INN = :INN,'
      '    TEN_ID = :TEN_ID,'
      '    SEX = :SEX,'
      '    WORKABILITY = :WORKABILITY,'
      '    LIVING_STAT = :LIVING_STAT,'
      '    SGPS = :SGPS,'
      '    RANK = :RANK,'
      '    WORKPLACE = :WORKPLACE,'
      '    LGOT_RECIVE = :LGOT_RECIVE,'
      '    CREATEDATE = :CREATEDATE,'
      '    PHONE = :PHONE'
      'WHERE'
      '    ID = :OLD_ID'
      '    ')
    DeleteSQL.Strings = (
      'DELETE FROM'
      '    CLIENTS'
      'WHERE'
      '        ID = :OLD_ID'
      '    ')
    RefreshSQL.Strings = (
      'SELECT'
      '    ID,'
      '    NAME,'
      '    FNAME,'
      '    SNAME,'
      '    LNAME,'
      '    PHONE,'
      '    BIRTHDATE,'
      '    INN,'
      
        '    (select rname from user_getfullname  (CREATEUSERID)) as CREA' +
        'TEUSER,'
      '    CREATEDATE,'
      
        '    (select rname from user_getfullname  (MODIFYUSERID)) as MODI' +
        'FYUSER,'
      '    MODIFYDATE,'
      '    TEN_ID,'
      '    SEX,'
      '    WORKABILITY,'
      '    LIVING_STAT,'
      '    SGPS,'
      '    RANK,'
      '    WORKPLACE,'
      '    LGOT_RECIVE'
      'FROM'
      '    CLIENTS '
      'where(  '
      '    id = :pclient_id'
      '     ) and (     CLIENTS.ID = :OLD_ID'
      '     )'
      '    ')
    SelectSQL.Strings = (
      'SELECT'
      '    ID,'
      '    NAME,'
      '    FNAME,'
      '    SNAME,'
      '    LNAME,'
      '    PHONE,'
      '    BIRTHDATE,'
      '    INN,'
      
        '    (select rname from user_getfullname  (CREATEUSERID)) as CREA' +
        'TEUSER,'
      '    CREATEDATE,'
      
        '    (select rname from user_getfullname  (MODIFYUSERID)) as MODI' +
        'FYUSER,'
      '    MODIFYDATE,'
      '    TEN_ID,'
      '    SEX,'
      
        '    (select cast(rvalue as integer) from proc_client_param_by_da' +
        'te (clients.id, '#39'WORKABILITY'#39', current_date)) as WORKABILITY,'
      '    LIVING_STAT,'
      '    SGPS,'
      '    RANK,'
      '    WORKPLACE,'
      '    LGOT_RECIVE'
      'FROM'
      '    CLIENTS '
      'where '
      '    id = :pclient_id')
    Transaction = trTenant
    Database = MAINDM.pMainDatabase
    UpdateTransaction = UpdateTrans
    Container = DSContainer
    Left = 568
    Top = 104
    object dsClientID: TFIBIntegerField
      FieldName = 'ID'
    end
    object dsClientNAME: TFIBStringField
      FieldName = 'NAME'
      Size = 92
      EmptyStrToNull = True
    end
    object dsClientPHONE: TFIBStringField
      FieldName = 'PHONE'
      EmptyStrToNull = True
    end
    object dsClientBIRTHDATE: TFIBDateField
      FieldName = 'BIRTHDATE'
    end
    object dsClientINN: TFIBStringField
      FieldName = 'INN'
      Size = 12
      EmptyStrToNull = True
    end
    object dsClientCREATEUSER: TFIBStringField
      FieldName = 'CREATEUSER'
      Size = 150
      EmptyStrToNull = True
    end
    object dsClientCREATEDATE: TFIBDateField
      FieldName = 'CREATEDATE'
    end
    object dsClientMODIFYUSER: TFIBStringField
      FieldName = 'MODIFYUSER'
      Size = 150
      EmptyStrToNull = True
    end
    object dsClientMODIFYDATE: TFIBDateField
      FieldName = 'MODIFYDATE'
    end
    object dsClientTEN_ID: TFIBStringField
      FieldName = 'TEN_ID'
      Size = 60
      EmptyStrToNull = True
    end
    object dsClientSEX: TFIBStringField
      FieldName = 'SEX'
      Size = 1
      EmptyStrToNull = True
    end
    object dsClientWORKABILITY: TFIBIntegerField
      FieldName = 'WORKABILITY'
    end
    object dsClientLIVING_STAT: TFIBIntegerField
      FieldName = 'LIVING_STAT'
    end
    object dsClientSGPS: TFIBStringField
      FieldName = 'SGPS'
      EmptyStrToNull = True
    end
    object dsClientRANK: TFIBStringField
      FieldName = 'RANK'
      Size = 255
      EmptyStrToNull = True
    end
    object dsClientWORKPLACE: TFIBStringField
      FieldName = 'WORKPLACE'
      Size = 255
      EmptyStrToNull = True
    end
    object dsClientFNAME: TFIBIntegerField
      FieldName = 'FNAME'
    end
    object dsClientSNAME: TFIBIntegerField
      FieldName = 'SNAME'
    end
    object dsClientLNAME: TFIBIntegerField
      FieldName = 'LNAME'
    end
    object dsClientLGOT_RECIVE: TFIBSmallIntField
      FieldName = 'LGOT_RECIVE'
    end
  end
  object dsTenantStatusHist: TpFIBDataSet
    UpdateSQL.Strings = (
      'update clients_stat_hist'
      'set docdate = :rdocdate,'
      '    is_deleted = :ris_deleted'
      'where (id = :RRECORD_ID)')
    SelectSQL.Strings = (
      'SELECT RRECORD_ID,'
      '       RABONENT_ID,'
      '       (select first(1) c.name from clients_oper_types c'
      '         where c.code = p.roper_status) as status,'
      '       RDOCDATE, RCREATEUSERID, RCREATEDATE,'
      '       v.address as adress,'
      
        '       (select rname from user_getfullname (p.rcreateuserid)) as' +
        ' CreateUser,'
      '       0 as ris_deleted,'
      '       p.rnote'
      'FROM PROC_CLIENT_GET_STATUS_HIST(:PCLIENT_ID, null) p, v_abons v'
      'where v.id = p.rabonent_id')
    Transaction = trTenant
    Database = MAINDM.pMainDatabase
    UpdateTransaction = UpdateTrans
    Container = DSContainer
    Left = 568
    Top = 162
    object dsTenantStatusHistSTATUS: TFIBStringField
      DisplayLabel = #1057#1090#1072#1090#1091#1089
      FieldName = 'STATUS'
      Size = 30
      EmptyStrToNull = True
    end
    object dsTenantStatusHistRDOCDATE: TFIBDateField
      DisplayLabel = #1044#1072#1090#1072
      FieldName = 'RDOCDATE'
    end
    object dsTenantStatusHistADRESS: TFIBStringField
      DisplayLabel = #1040#1076#1088#1077#1089
      FieldName = 'ADRESS'
      Size = 258
      EmptyStrToNull = True
    end
    object dsTenantStatusHistCREATEUSER: TFIBStringField
      DisplayLabel = #1057#1086#1079#1076#1072#1083
      FieldName = 'CREATEUSER'
      Size = 150
      EmptyStrToNull = True
    end
    object dsTenantStatusHistRCREATEDATE: TFIBDateField
      DisplayLabel = #1057#1086#1079#1076#1072#1085#1086
      FieldName = 'RCREATEDATE'
    end
    object dsTenantStatusHistRRECORD_ID: TFIBIntegerField
      FieldName = 'RRECORD_ID'
    end
    object dsTenantStatusHistRABONENT_ID: TFIBIntegerField
      FieldName = 'RABONENT_ID'
    end
    object dsTenantStatusHistRCREATEUSERID: TFIBIntegerField
      FieldName = 'RCREATEUSERID'
    end
    object dsTenantStatusHistRIS_DELETED: TFIBIntegerField
      FieldName = 'RIS_DELETED'
    end
    object dsTenantStatusHistRNOTE: TFIBStringField
      DisplayLabel = #1055#1088#1080#1084#1077#1095#1072#1085#1080#1077
      DisplayWidth = 20
      FieldName = 'RNOTE'
      Size = 120
      EmptyStrToNull = True
    end
  end
  object dscTenantStatusHist: TDataSource
    DataSet = dsTenantStatusHist
    Left = 630
    Top = 160
  end
  object dsExempts: TpFIBDataSet
    UpdateSQL.Strings = (
      'UPDATE CLIENTEXEMPTS'
      'SET '
      '    EXEMPT_DOC = :EXEMPT_DOC,'
      '    EXEMPT_BDATE = :EXEMPT_BDATE,'
      '    EXEMPT_EDATE = :EXEMPT_EDATE,'
      '    ADD_SQ = :ADD_SQ,'
      '    DOC_NUM = :DOC_NUM,'
      '    DOC_SERIAL = :DOC_SERIAL,'
      '    DOC_DATE = DOC_DATE'
      'WHERE'
      '    ID = :OLD_ID'
      '    ')
    DeleteSQL.Strings = (
      'DELETE FROM'
      '    CLIENTEXEMPTS'
      'WHERE'
      '        ID = :OLD_ID'
      '    ')
    InsertSQL.Strings = (
      'INSERT INTO CLIENTEXEMPTS('
      '    CLIENT_ID,'
      '    EXEMPTTYPES_ID,'
      '    EXEMPT_DOC,'
      '    EXEMPT_BDATE,'
      '    EXEMPT_EDATE,'
      '    ADD_SQ,'
      '    DOC_NUM,'
      '    DOC_SERIAL,'
      '    DOC_DATE'
      ')'
      'VALUES('
      '    :CLIENT_ID,'
      '    :EXEMPTTYPES_ID,'
      '    :EXEMPT_DOC,'
      '    :EXEMPT_BDATE,'
      '    :EXEMPT_EDATE,'
      '    :ADD_SQ,'
      '    :DOC_NUM,'
      '    :DOC_SERIAL,'
      '    :DOC_DATE'
      ')')
    RefreshSQL.Strings = (
      'select clientexempts.*, exempttypes.name,'
      
        '(select RNAME from USER_GETFULLNAME(clientexempts.modifyuserid))' +
        ' as UserMName,'
      
        '(select RNAME from USER_GETFULLNAME(clientexempts.Createuserid))' +
        ' as UserCName'
      'from clientexempts, exempttypes'
      'where( '
      '     clientexempts.client_id = :PCLIENT_ID'
      '     and exempttypes.id = clientexempts.exempttypes_id'
      '     ) and (     CLIENTEXEMPTS.ID = :OLD_ID'
      '     )'
      '    ')
    SelectSQL.Strings = (
      'select clientexempts.*, exempttypes.name,'
      
        '(select RNAME from USER_GETFULLNAME(clientexempts.modifyuserid))' +
        ' as UserMName,'
      
        '(select RNAME from USER_GETFULLNAME(clientexempts.Createuserid))' +
        ' as UserCName'
      'from clientexempts, exempttypes'
      'where'
      '     clientexempts.client_id = :PCLIENT_ID'
      '     and exempttypes.id = clientexempts.exempttypes_id'
      'Order by Name')
    Transaction = trTenant
    Database = MAINDM.pMainDatabase
    UpdateTransaction = UpdateTrans
    Container = DSContainer
    Left = 568
    Top = 190
    object dsExemptsCLIENT_ID: TFIBIntegerField
      FieldName = 'CLIENT_ID'
    end
    object dsExemptsEXEMPTTYPES_ID: TFIBIntegerField
      FieldName = 'EXEMPTTYPES_ID'
    end
    object dsExemptsEXEMPT_DOC: TFIBStringField
      DisplayLabel = #1044#1086#1082#1091#1084#1077#1085#1090
      DisplayWidth = 15
      FieldName = 'EXEMPT_DOC'
      Size = 255
      EmptyStrToNull = True
    end
    object dsExemptsEXEMPT_BDATE: TFIBDateField
      DisplayLabel = #1053#1072#1095#1072#1083#1086' '#1076#1077#1081#1089#1090#1074'.'
      FieldName = 'EXEMPT_BDATE'
    end
    object dsExemptsEXEMPT_EDATE: TFIBDateField
      DisplayLabel = #1050#1086#1085#1077#1094' '#1076#1077#1081#1089#1090#1074'.'
      FieldName = 'EXEMPT_EDATE'
    end
    object dsExemptsCREATEDATE: TFIBDateField
      DisplayLabel = #1057#1086#1079#1076#1072#1085#1086
      FieldName = 'CREATEDATE'
    end
    object dsExemptsMODIFYDATE: TFIBDateField
      DisplayLabel = #1048#1079#1084#1077#1085#1077#1085#1086
      FieldName = 'MODIFYDATE'
    end
    object dsExemptsADD_SQ: TFIBFloatField
      DisplayLabel = #1044#1086#1087'.'#1087#1083#1086#1097#1072#1076#1100
      FieldName = 'ADD_SQ'
    end
    object dsExemptsNAME: TFIBStringField
      DisplayLabel = #1051#1100#1075#1086#1090#1072
      DisplayWidth = 30
      FieldName = 'NAME'
      Size = 120
      EmptyStrToNull = True
    end
    object dsExemptsUSERMNAME: TFIBStringField
      DisplayLabel = #1048#1079#1084#1077#1085#1080#1083
      FieldName = 'USERMNAME'
      Size = 150
      EmptyStrToNull = True
    end
    object dsExemptsUSERCNAME: TFIBStringField
      DisplayLabel = #1057#1086#1079#1076#1072#1083
      FieldName = 'USERCNAME'
      Size = 150
      EmptyStrToNull = True
    end
    object dsExemptsID: TFIBIntegerField
      DisplayLabel = #1048#1044
      FieldName = 'ID'
    end
    object dsExemptsORG: TFIBStringField
      FieldName = 'ORG'
      Size = 60
      EmptyStrToNull = True
    end
    object dsExemptsDOC_NUM: TFIBStringField
      DisplayLabel = #1053#1086#1084#1077#1088
      FieldName = 'DOC_NUM'
      Size = 10
      EmptyStrToNull = True
    end
    object dsExemptsDOC_SERIAL: TFIBStringField
      DisplayLabel = #1057#1077#1088#1080#1103
      FieldName = 'DOC_SERIAL'
      Size = 10
      EmptyStrToNull = True
    end
    object dsExemptsDOC_DATE: TFIBDateField
      DisplayLabel = #1044#1072#1090#1072' '#1074#1099#1076#1072#1095#1080
      FieldName = 'DOC_DATE'
    end
  end
  object dscExempts: TDataSource
    DataSet = dsExempts
    Left = 630
    Top = 188
  end
  object dsFamily: TpFIBDataSet
    DeleteSQL.Strings = (
      'DELETE FROM'
      '    FAMILY'
      'WHERE'
      '        ID = :OLD_ID'
      '    ')
    SelectSQL.Strings = (
      
        'select f1.id, f1.kinsman_id as fclient_id, c1.name, c1.sex, prr1' +
        '.name as relation, f1.bdate, f1.edate'
      '  from family f1'
      '  join clients c1 on f1.kinsman_id = c1.id'
      '  left join pas_rrelation prr1 on prr1.id = f1.kins_relation'
      '    where f1.tenant_id = :pclient_id'
      'union'
      
        'select f2.id, f2.tenant_id as fclient_id, c2.name, c2.sex, prr2.' +
        'name as relation, f2.bdate, f2.edate'
      '  from family f2'
      '  join clients c2 on f2.tenant_id = c2.id'
      '  left join pas_rrelation prr2 on prr2.id = f2.ten_relation'
      '    where f2.kinsman_id = :pclient_id')
    Transaction = trTenant
    Database = MAINDM.pMainDatabase
    UpdateTransaction = UpdateTrans
    Container = DSContainer
    Left = 688
    Top = 160
    object dsFamilyFCLIENT_ID: TFIBIntegerField
      FieldName = 'FCLIENT_ID'
    end
    object dsFamilyNAME: TFIBStringField
      DisplayLabel = #1060#1048#1054' '#1088#1086#1076#1089#1090#1074#1077#1085#1085#1080#1082#1072
      FieldName = 'NAME'
      Size = 120
      EmptyStrToNull = True
    end
    object dsFamilySEX: TFIBStringField
      DisplayLabel = #1055#1086#1083
      FieldName = 'SEX'
      Size = 1
      EmptyStrToNull = True
    end
    object dsFamilyRELATION: TFIBStringField
      DisplayLabel = #1056#1086#1076#1089#1090#1074#1077#1085#1085#1086#1077' '#1086#1090#1085#1086#1096#1077#1085#1080#1077
      FieldName = 'RELATION'
      Size = 60
      EmptyStrToNull = True
    end
    object dsFamilyBDATE: TFIBDateField
      DisplayLabel = #1053#1072#1095#1072#1083#1086' '#1089#1074#1103#1079#1080
      FieldName = 'BDATE'
    end
    object dsFamilyEDATE: TFIBDateField
      DisplayLabel = #1054#1082#1086#1085#1095#1072#1085#1080#1077' '#1089#1074#1103#1079#1080
      FieldName = 'EDATE'
    end
    object dsFamilyID: TFIBIntegerField
      FieldName = 'ID'
    end
  end
  object dscFamily: TDataSource
    DataSet = dsFamily
    Left = 748
    Top = 160
  end
  object dsClientHistr: TpFIBDataSet
    DeleteSQL.Strings = (
      'delete from trelations_histr c'
      '  where c.id = :rrecord_id')
    SelectSQL.Strings = (
      'select pch.*, u1.surname as  creator'
      'from PROC_CLIENT_GET_HIST(:pclient_id, current_date) pch'
      ' left join username u1 on u1.id = pch.createuserid')
    Transaction = trTenant
    Database = MAINDM.pMainDatabase
    UpdateTransaction = UpdateTrans
    Container = DSContainer
    Left = 688
    Top = 188
    object dsClientHistrFIELD_NAME: TFIBStringField
      DisplayLabel = #1055#1086#1083#1077
      FieldName = 'FIELD_NAME'
      Size = 60
      EmptyStrToNull = True
    end
    object dsClientHistrDOCDATE: TFIBDateField
      DisplayLabel = #1044#1077#1081#1089#1090#1074#1091#1077#1090' '#1089' '#1076#1072#1090#1099
      FieldName = 'DOCDATE'
    end
    object dsClientHistrOLD_VALUE: TFIBStringField
      DisplayLabel = #1057#1090#1072#1088#1086#1077' '#1079#1085#1072#1095#1077#1085#1080#1077
      FieldName = 'OLD_VALUE'
      Size = 120
      EmptyStrToNull = True
    end
    object dsClientHistrNEW_VALUE: TFIBStringField
      DisplayLabel = #1053#1086#1074#1086#1077' '#1079#1085#1072#1095#1077#1085#1080#1077
      FieldName = 'NEW_VALUE'
      Size = 120
      EmptyStrToNull = True
    end
    object dsClientHistrCREATOR: TFIBStringField
      DisplayLabel = #1048#1079#1084#1077#1085#1080#1083
      FieldName = 'CREATOR'
      Size = 35
      EmptyStrToNull = True
    end
    object dsClientHistrCREATEDATE: TFIBDateField
      DisplayLabel = #1044#1072#1090#1072' '#1080#1079#1084#1077#1085#1077#1085#1080#1103
      FieldName = 'CREATEDATE'
    end
  end
  object dscClientHistr: TDataSource
    DataSet = dsClientHistr
    Left = 748
    Top = 188
  end
  object dcsClient: TDataSource
    DataSet = dsClient
    OnDataChange = dcsClientDataChange
    Left = 630
    Top = 104
  end
  object dsListWorkAbility: TpFIBDataSet
    SelectSQL.Strings = (
      'select * '
      'from SUBS_WORKABILITY')
    Transaction = trTenant
    Database = MAINDM.pMainDatabase
    UpdateTransaction = UpdateTrans
    Container = DSContainer
    Left = 688
    Top = 104
  end
  object dscListWorkAbility: TDataSource
    DataSet = dsListWorkAbility
    Left = 748
    Top = 104
  end
  object dscClientStatus: TDataSource
    DataSet = dsClientStatus
    Left = 630
    Top = 132
  end
  object DSContainer: TDataSetsContainer
    Left = 632
    Top = 56
  end
  object UpdateTrans: TpFIBTransaction
    DefaultDatabase = MAINDM.pMainDatabase
    TimeoutAction = TARollback
    Left = 690
    Top = 217
  end
  object ds_LNames: TpFIBDataSet
    InsertSQL.Strings = (
      'INSERT INTO LAST_NAMES('
      '    NAME'
      ')'
      'VALUES('
      '    :NAME'
      ')'
      'returning id')
    SelectSQL.Strings = (
      'SELECT'
      '    ID,'
      '    NAME'
      'FROM'
      '    LAST_NAMES '
      'where id > -1'
      'order by 2')
    Transaction = trTenant
    Database = MAINDM.pMainDatabase
    UpdateTransaction = NamesTrans
    Container = DSContainer
    Left = 412
    Top = 156
    oRefreshAfterPost = False
    oFetchAll = True
    object ds_LNamesID: TFIBIntegerField
      FieldName = 'ID'
    end
    object ds_LNamesNAME: TFIBStringField
      FieldName = 'NAME'
      Size = 30
      EmptyStrToNull = True
    end
  end
  object dsc_LNames: TDataSource
    DataSet = ds_LNames
    OnDataChange = dcsClientDataChange
    Left = 442
    Top = 156
  end
  object dsc_FNames: TDataSource
    DataSet = ds_FNames
    OnDataChange = dcsClientDataChange
    Left = 442
    Top = 188
  end
  object ds_FNames: TpFIBDataSet
    InsertSQL.Strings = (
      'INSERT INTO FIRST_NAMES('
      '    NAME, SEX'
      ')'
      'VALUES('
      '    :NAME, :SEX'
      ')'
      'returning id')
    SelectSQL.Strings = (
      'SELECT'
      '    ID,'
      '    NAME,'
      '    SEX'
      'FROM'
      '    FIRST_NAMES '
      'where sex = :psex or cast(:psex as char(1)) = '#39#39
      'order by 2')
    BeforeOpen = ds_FNamesBeforeOpen
    Transaction = trTenant
    Database = MAINDM.pMainDatabase
    UpdateTransaction = NamesTrans
    Container = DSContainer
    Left = 412
    Top = 188
    oRefreshAfterPost = False
    oFetchAll = True
    object ds_FNamesID: TFIBIntegerField
      FieldName = 'ID'
    end
    object ds_FNamesNAME: TFIBStringField
      FieldName = 'NAME'
      Size = 30
      EmptyStrToNull = True
    end
    object ds_FNamesSEX: TFIBStringField
      FieldName = 'SEX'
      Size = 1
      EmptyStrToNull = True
    end
  end
  object dsc_SNames: TDataSource
    DataSet = ds_SNames
    OnDataChange = dcsClientDataChange
    Left = 442
    Top = 220
  end
  object ds_SNames: TpFIBDataSet
    InsertSQL.Strings = (
      'INSERT INTO SECOND_NAMES('
      '    NAME, SEX'
      ')'
      'VALUES('
      '    :NAME, :SEX'
      ')'
      'returning id')
    SelectSQL.Strings = (
      'SELECT'
      '    ID,'
      '    NAME,'
      '    SEX'
      'FROM'
      '    SECOND_NAMES '
      'where sex = :psex or cast(:psex as char(1)) = '#39#39
      'order by 2')
    BeforeOpen = ds_FNamesBeforeOpen
    Transaction = trTenant
    Database = MAINDM.pMainDatabase
    UpdateTransaction = NamesTrans
    Container = DSContainer
    Left = 412
    Top = 220
    oRefreshAfterPost = False
    oFetchAll = True
    object ds_SNamesID: TFIBIntegerField
      FieldName = 'ID'
    end
    object ds_SNamesNAME: TFIBStringField
      FieldName = 'NAME'
      Size = 30
      EmptyStrToNull = True
    end
    object ds_SNamesSEX: TFIBStringField
      FieldName = 'SEX'
      Size = 1
      EmptyStrToNull = True
    end
  end
  object NamesTrans: TpFIBTransaction
    DefaultDatabase = MAINDM.pMainDatabase
    TimeoutAction = TARollback
    Left = 414
    Top = 253
  end
  object dsIsPassport: TpFIBDataSet
    SelectSQL.Strings = (
      'select b.is_passport'
      'from proc_client_get_status(:pclient_id, current_date) p'
      '  join abonents a on a.id = p.rabonent_id'
      '  join buildings b on b.id = a.building_id'
      '  join clients_oper_types ot on ot.code = p.rstatus'
      '    and ot.allow_in_ps = 1')
    Transaction = trTenant
    Database = MAINDM.pMainDatabase
    UpdateTransaction = UpdateTrans
    Container = DSContainer
    Left = 570
    Top = 251
    object dsIsPassportIS_PASSPORT: TFIBSmallIntField
      FieldName = 'IS_PASSPORT'
    end
  end
  object dsDocs: TpFIBDataSet
    UpdateSQL.Strings = (
      'UPDATE PAS_CLIENTDOCS'
      'SET '
      '    DOC_TYPE = :DOC_TYPE_ID,'
      '    SERIAL = :SERIAL,'
      '    NUMBER = :NUMBER,'
      '    ORGAN_ID = :ORGAN_ID,'
      '    DOCDATE = :BDATE,'
      '    EXPDATE = :EDATE,'
      '    DOCREASON = :DOCREASON,'
      '    ORGANTOWN = :ORGANTOWN'
      'WHERE'
      '    ID = :OLD_ID'
      '    ')
    DeleteSQL.Strings = (
      'DELETE FROM'
      '    PAS_CLIENTDOCS'
      'WHERE'
      '        ID = :OLD_ID'
      '    ')
    InsertSQL.Strings = (
      'INSERT INTO PAS_CLIENTDOCS('
      '    CLIENT_ID,'
      '    DOC_TYPE,'
      '    SERIAL,'
      '    NUMBER,'
      '    ORGAN_ID,'
      '    DOCDATE,'
      '    EXPDATE,'
      '    DOCREASON,'
      '    ORGANTOWN'
      ')'
      'VALUES('
      '    :CLIENT_ID,'
      '    :DOC_TYPE_ID,'
      '    :SERIAL,'
      '    :NUMBER,'
      '    :ORGAN_ID,'
      '    :BDATE,'
      '    :EDATE,'
      '    :DOCREASON,'
      '    :ORGANTOWN'
      ')')
    RefreshSQL.Strings = (
      'select'
      '  pd.id,'
      '  client_id,'
      '  pd.doc_type as doc_type_id,'
      
        '  (select pdt.name from pas_ridentitycard pdt where pdt.id = pd.' +
        'doc_type) as doc_type,'
      '  pd.serial,'
      '  pd.number,'
      '  pd.organ_id,'
      
        '  (select po.name from pas_rdoc_organ po where po.id = pd.organ_' +
        'id) as organ,'
      '  pd.docdate as bdate,'
      '  pd.expdate as edate,'
      
        '  (select pd.docreason from  pas_rdocreason pdr where pdr.id = p' +
        'd.docreason) as reason,'
      '  pd.organtown,'
      '  pd.createdate,'
      
        '  (select u.surname||'#39' '#39'||u.firstname||'#39' '#39'||u.lastname from user' +
        'name u where u.id = pd.createuserid) as createuser'
      'from pas_clientdocs pd'
      'where(  pd.client_id = :pclient_id'
      '     ) and (     PD.ID = :OLD_ID'
      '     )'
      '    ')
    SelectSQL.Strings = (
      'select'
      '  pd.id,'
      '  client_id,'
      '  pd.doc_type as doc_type_id,'
      
        '  (select pdt.name from pas_ridentitycard pdt where pdt.id = pd.' +
        'doc_type) as doc_type,'
      '  pd.serial,'
      '  pd.number,'
      '  pd.organ_id,'
      
        '  (select po.name from pas_rdoc_organ po where po.id = pd.organ_' +
        'id) as organ,'
      '  pd.docdate as bdate,'
      '  pd.expdate as edate,'
      
        '  (select pd.docreason from  pas_rdocreason pdr where pdr.id = p' +
        'd.docreason) as reason,'
      '  pd.organtown,'
      '  pd.createdate,'
      
        '  (select u.surname||'#39' '#39'||u.firstname||'#39' '#39'||u.lastname from user' +
        'name u where u.id = pd.createuserid) as createuser'
      'from pas_clientdocs pd'
      'where pd.client_id = :pclient_id')
    Transaction = trTenant
    Database = MAINDM.pMainDatabase
    UpdateTransaction = UpdateTrans
    Container = DSContainer
    Left = 568
    Top = 221
    object dsDocsID: TFIBIntegerField
      DisplayLabel = #1048#1044
      FieldName = 'ID'
    end
    object dsDocsCLIENT_ID: TFIBIntegerField
      FieldName = 'CLIENT_ID'
    end
    object dsDocsDOC_TYPE: TFIBStringField
      DisplayLabel = #1058#1080#1087' '#1076#1086#1082#1091#1084#1077#1085#1090#1072
      FieldName = 'DOC_TYPE'
      Size = 60
      EmptyStrToNull = True
    end
    object dsDocsSERIAL: TFIBStringField
      DisplayLabel = #1057#1077#1088#1080#1103
      FieldName = 'SERIAL'
      Size = 16
      EmptyStrToNull = True
    end
    object dsDocsNUMBER: TFIBStringField
      DisplayLabel = #1053#1086#1084#1077#1088
      FieldName = 'NUMBER'
      Size = 60
      EmptyStrToNull = True
    end
    object dsDocsORGAN: TFIBStringField
      DisplayLabel = #1054#1088#1075#1072#1085' '#1074#1099#1076#1072#1095#1080
      FieldName = 'ORGAN'
      Size = 255
      EmptyStrToNull = True
    end
    object dsDocsBDATE: TFIBDateField
      DisplayLabel = #1044#1072#1090#1072' '#1074#1099#1076#1072#1095#1080
      FieldName = 'BDATE'
    end
    object dsDocsEDATE: TFIBDateField
      DisplayLabel = #1044#1072#1090#1072' '#1086#1082#1086#1085#1095#1072#1085#1080#1103
      FieldName = 'EDATE'
    end
    object dsDocsCREATEDATE: TFIBDateField
      DisplayLabel = #1044#1072#1090#1072' '#1089#1086#1079#1076#1072#1085#1080#1103
      FieldName = 'CREATEDATE'
    end
    object dsDocsCREATEUSER: TFIBStringField
      DisplayLabel = #1057#1086#1079#1076#1072#1090#1077#1083#1100
      FieldName = 'CREATEUSER'
      Size = 102
      EmptyStrToNull = True
    end
    object dsDocsDOC_TYPE_ID: TFIBIntegerField
      FieldName = 'DOC_TYPE_ID'
    end
    object dsDocsORGAN_ID: TFIBIntegerField
      FieldName = 'ORGAN_ID'
    end
    object dsDocsREASON: TFIBIntegerField
      FieldName = 'REASON'
    end
    object dsDocsORGANTOWN: TFIBIntegerField
      FieldName = 'ORGANTOWN'
    end
  end
  object dscDocs: TDataSource
    DataSet = dsDocs
    Left = 630
    Top = 221
  end
end
